<?php if ($model!=NULL && count($model)!=0) : ?>
<?php foreach ($model as $key => $value) : ?>
<div class="u_audio__item">
	<div class="play_btn"></div>
	<div class="u_audio_track">
		<?php if($value->artist){ ?>
			<a href="#" data-src="<?php echo '/upload/audio/'.$value->music_info->file;?>" class="u_audio__autor"><?php echo $value->artist;?></a>
			<span> &mdash; </span>
		<?php } ?>
		<a href="#" data-src="<?php echo '/upload/audio/'.$value->music_info->file;?>" class="u_audio__name"><?php echo $value->name;?></a>
	</div>
	<div class="player_block_links">
		<?php if(Yii::app()->user->id==$value->user_id) {?>
			<a href="<?php echo Yii::app()->createUrl('audio/deleteAudio', array('id'=>$value->id,'profile'=>Yii::app()->request->getParam('profile'))); ?>" class="u_buzz_link l2 removeLink">
				<div class="user_action_item_tooltip c hidden"><div class="cc">Удалить аудиозапись</div></div>
			</a>
			<a href="<?php echo Yii::app()->createUrl('audio/update', array('id'=>$value->id,'profile'=>Yii::app()->request->getParam('profile'))); ?>" class="u_buzz_link l3 ajaxLink">
				<div class="user_action_item_tooltip c hidden"><div class="cc">Редактировать аудиозапись</div></div>
			</a>
		<?php } else { ?>
			<a href="<?php echo Yii::app()->createUrl('audio/copy', array('id'=>$value->id)); ?>" class="u_buzz_link copymusic">
				<div class="user_action_item_tooltip c hidden"><div class="cc">Добавить аудиозапись</div></div>
			</a>
		<?php } ?>
	</div>
</div>
<?php endforeach; ?>
<?php endif; ?>